jQuery(function() {
  // add a delay for init slider, because the container will resize on page load,
  // before that, the container width is not right
  setTimeout(getSlider, 200);

  function getSlider() {
    return new Swiper ('.swiper-container', {
      // Optional parameters
      direction: 'horizontal',
      loop: true,
      // If we need pagination
      pagination: {
        el: '.swiper-pagination',
        clickable: true
      }
    });
  }

});
